﻿<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<IEnumerable<CourseSystem.Core.Entities.ChapterInfo>>" %>
<%@ Import Namespace="Chowpoo.Util" %>
<%@ Import Namespace="CourseSystem.Common.Helpers" %>
<%
    var id = ViewData["id"].CheckInt(0);
    var iss = ViewData["iss"].CheckInt(0);
    var cid = ViewData["cid"].CheckInt(0);
%>
<td width="222" height="343" align="center" valign="top">
    <table width="222" border="0" cellspacing="0" cellpadding="0">
        <tr>
            <td height="37" background="<%=ResolveUrl("~/Content/images/6_000.jpg") %>">
                 <div style="color: White; text-align: center; font-size: 17px; font-weight: bold">
                                            课程学习</div>
            </td>
        </tr>
        <tr>
            <td height="120" align="center" valign="top" background="<%=ResolveUrl("~/Content/images/3_20.jpg") %>">
            <% foreach(var item in Model){%>
                <table width="200" height="24" border="0" cellpadding="0" cellspacing="0">
                    <tr>
                        <td width="24" class="style6">
                            &nbsp;
                        </td>
                        <td width="152" class="style15">
                            <div align="left" class="<%=item.Id==cid?"style30":"style26NoBold" %>">
                             <a class="<%=item.Id==cid?"style30":"style26NoBold" %>" href="<%=Url.Action("Index","Study",new{item.Id}) %>"> <%=item.Name %>  </a></div>
                        </td>
                        <td width="24" class="style15">
                            &nbsp;
                        </td>
                    </tr>
                </table>
                <table width="216" height="1" border="0" cellpadding="0" cellspacing="0">
                    <tr>
                        <td width="17">
                        </td>
                        <td width="184" background="<%=ResolveUrl("~/Content/images/3.gif") %>">
                        </td>
                        <td width="15">
                        </td>
                    </tr>
                </table>
                <%foreach(var section in item.SectionInfo.OrderBy(o=>o.OrderId)){ %>
                <table width="200" height="24" border="0" cellpadding="0" cellspacing="0">
                    <tr>
                        <td width="54" class="style6">
                            &nbsp;
                        </td>
                        <td width="146" class="style15">
                            <div align="center" class="style24">
                                <div align="left" class="<%=iss==1&&section.Id==id?"blod":"style15" %>">
                                   <a class="style26NoBold" href="<%=Url.Action("Index","Study",new{section.Id,iss=1}) %>"> <%=section.Name%></a></div>
                            </div>
                        </td>
                    </tr>
                </table>
                <%} %>
                <table width="216" height="1" border="0" cellpadding="0" cellspacing="0">
                    <tr>
                        <td width="17">
                        </td>
                        <td width="184" background="<%=ResolveUrl("~/Content/images/3.gif") %>">
                        </td>
                        <td width="15">
                        </td>
                    </tr>
                </table>
                <%}  %>
            </td>
        </tr>
        <tr>
            <td height="9" background="<%=ResolveUrl("~/Content/images/3_22.jpg") %>">
            </td>
        </tr>
    </table>
</td>
